/**
 * Copyright (c) 2019, ShangHai YTO Co., Ltd.
 * All right reserved.
 * <p>
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF YTO
 * CO., LTD.  THE CONTENTS OF THIS FILE MAY NOT BE DISCLOSED
 * TO THIRD PARTIES, COPIED OR DUPLICATED IN ANY FORM, IN WHOLE OR IN PART,
 * WITHOUT THE PRIOR WRITTEN PERMISSION OF YTO
 * CO., LTD.
 */
package org.sc.xl.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.assertj.core.util.Maps;
import org.sc.xl.dao.ColumnsMapper;
import org.sc.xl.vo.ColumnsVO;
import org.sc.xl.service.ColumnService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author FXL
 * @description: TODO 请在此添加描述
 * @reason: TODO ADD REASON(可选)
 * @date 2021/11/16 21:23
 * @since JDK 1.8
 */
@DS("info_schema")
@Service
public class ColumnServiceImpl extends ServiceImpl<ColumnsMapper, ColumnsVO> implements ColumnService {

    @Resource
    private ColumnsMapper columnsMapper;

    @Override
    public List<ColumnsVO> columnList(String tableName) {
        return columnsMapper.selectByMap(Maps.newHashMap("table_name", tableName));
    }
}
